key_priority = {
    'ok': 1,
    'normal': 2,
    'on': 3,
    'n/a': 9
}
# 定义在multi_command中的参数同时会影响到不同厂家的交换机
ambiguous_command = ['temp', 'fan']
invalid_key = b'Invalid|Unrecognize'

sys_detect_command = {
    'ruijie': 'show version',
    'h3c': 'display version'
}
sys_detect_regex = {
    'ruijie': b'ruijie|Ruijie|RuiJie',
    'h3c': b'h3c|H3c|H3C'
}
ruijie_command = {
    'cpu': 'show cpu | include CPU',
    'mem': 'show memory',
    'clock': 'show clock',
    'uptime': 'show version | include uptime',
    'temp': ['show envir', 'show temp'],
    # 'fan': 'show environment | include Fan',
    'fan': ['show fan', 'show environment | include Fan']
}
ruijie_pattern = {
    'cpu': r'\d{1,2}%|\d{1,2}\.\d{1,2}%',
    'mem': r'\d{1,2}%|\d{1,2}\.\d{1,2}%',
    'clock': r'\d+:\d+:\d+',
    'uptime': r'\d+:\d{1,2}:\d{1,2}:\d{1,2}',
    'temp': r'\d{2}|\d{2}\.\d{1,3}',
    'fan': 'on|Normal|ok|N/A',
}
h3c_command = {
    'cpu': r'display cpu',
    'mem': r'display mem',
    'fan': [r'display fan'],
    'temp': [r'display envir'],
    'clock': r'display clock | include /',
    'uptime': r'display version | include uptime'
}
h3c_pattern = {
    'cpu': r'\d{1,2}%|\d{1,2}\.\d{1,2}%',
    'mem': r'\d{1,2}%|\d{1,2}\.\d{1,2}%',
    'fan': r'Normal',
    'temp': r'\d{2}',
    'clock': r'\d+:\d+:\d+',
    'uptime': r'\d+\s+weeks'
}